import {createSlice} from '@reduxjs/toolkit'

const comprehensiveInquiry = createSlice({
  name:'comprehensiveInquiry',
  initialState: {
      json: sessionStorage.getItem('json') || {}
  },
  reducers: {
      setJson(state,action) {
          state.json = action.payload
      }
  }
})

export default  comprehensiveInquiry.reducer //是注册用
export const {setJson} = comprehensiveInquiry.actions //是函数使用